import { isNum, errorHandle } from "utils";
import { getErrorCode } from "utils/error/tool";
import type { InnerRequestConfig } from "../types/engine.type";

const DefaultConfig: InnerRequestConfig = {
    // 默认处理error
    autoHandleError: true,
    // #ifdef H5 || APP-PLUS || MP-WEIXIN || MP-ALIPAY
    timeout: 60000,
    // #endif
    dataType: "json",
    baseHeader: {
        "Content-Type": "application/json",
    },
    // #ifndef MP-ALIPAY
    // 支付宝不支持
    responseType: "text",
    // #endif
};

export default DefaultConfig;
